<?php
namespace api\modules\v1\controllers;

use api\modules\v1\models\feedback\FeedbackInfo;
use yii\filters\auth\HttpHeaderAuth;
use yii\helpers\ArrayHelper;
use Yii;
class FeedbackController extends DefaultController
{
    public $modelClass = '';

    public function behaviors() {
        return ArrayHelper::merge(parent::behaviors(), [
            'authenticator' => [
                'class' =>  HttpHeaderAuth::className(),
                'header' => 'access-token',
                'optional' => [

                ]
            ]
        ]);
    }

    public function actionInfo() {
        if (\Yii::$app->request->isPost) {
            $model = (new FeedbackInfo());
            $model->setScenario('feedback');
            if ($model->load(Yii::$app->request->post(), '')) {
                return $model->saveInfo();
            }

        }
    }

    
}
